﻿using BXH.Movie.Dal;
using BXH.Movie.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BXH.Movie.Bll
{
    public class UserInfoService
    {
        UserInfoDal userInfoDal = new UserInfoDal();
        public UserInfoService()
        {

        }
        public bool Reigster(UserInfo userInfo) {
            return userInfoDal.Add(userInfo);
        }
        public UserInfo Login(string userCode, string password) {
            return userInfoDal.Login(userCode, password);
        }
        public bool Update(UserInfo userInfo)
        {
            return userInfoDal.Update(userInfo);
        }

        public bool AddAdmin(UserInfo userInfo)
        {
            return userInfoDal.Add(userInfo);
        }

        public IEnumerable<UserInfo> GetAdmins()
        {
            return userInfoDal.GetAdmins();
        }

        public bool Delete(int id)
        {
            return userInfoDal.Delete(id);
        }
    }
}
